package com.mallcai.bigdata.ladon.job;

import com.mallcai.bigdata.ladon.service.system.IAccountService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.scheduling.annotation.Scheduled;
import org.springframework.stereotype.Component;

@Component
public class UserTokenJob {

    @Autowired
    private IAccountService iAccountService;

    /**
     * 定时每2小时删除过期token
     */
    @Scheduled(cron = "0 0 0/2 * * ?")
    public void deletToken() {
        iAccountService.deleteExpireToken();
    }
}
